import 'babel-polyfill'
import Vue from 'vue'
import 'static/css/reset.css'
// import 'static/css/bootstrops.css'
import "bootstrap-sass/assets/stylesheets/_bootstrap.scss";
import 'static/css/home.css'
import App from './App.vue'
import router from './router/app'
// import VueLazyload from 'vue-lazyload'
import store from './store'
import Http from './http'
import Message from 'tool/message'
import Title from './config'

Vue.config.productionTip = false
// Vue.config.devtools = true
Vue.use(Http)
Vue.use(Message)
// Vue.use(VueLazyload, {
//   loading: require('./common/image/default.jpg')
// })
Vue.prototype.$title = Title

router.beforeEach((to, from, next) => {
  if (to.matched.length ===0) {
    next('/error/404/page-not-find')
  } else {
    next()
  }
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})